Integrand size = 24, antiderivative size = 141 \[ \int \frac {\cos ^2(c+d x)}{(a+i a \tan (c+d x))^3} \, dx=\frac {5 x}{32 a^3}+\frac {i a}{16 d (a+i a \tan (c+d x))^4}+\frac {i}{12 d (a+i a \tan (c+d x))^3}+\frac {3 i}{32 a d (a+i a \tan (c+d x))^2}-\frac {i}{32 d \left (a^3-i a^3 \tan (c+d x)\right )}+\frac {i}{8 d \left (a^3+i a^3 \tan (c+d x)\right )} \]
5/32*x/a^3+1/16*I*a/d/(a+I*a*tan(d*x+c))^4+1/12*I/d/(a+I*a*tan(d*x+c))^3+3 /32*I/a/d/(a+I*a*tan(d*x+c))^2-1/32*I/d/(a^3-I*a^3*tan(d*x+c))+1/8*I/d/(a^ 3+I*a^3*tan(d*x+c))
Time = 0.24 (sec) , antiderivative size = 137, normalized size of antiderivative = 0.97 \[ \int \frac {\cos ^2(c+d x)}{(a+i a \tan (c+d x))^3} \, dx=-\frac {i a^3 \left (\frac {5 i \arctan (\tan (c+d x))}{32 a^6}+\frac {1}{32 a^5 (a-i a \tan (c+d x))}-\frac {1}{16 a^2 (a+i a \tan (c+d x))^4}-\frac {1}{12 a^3 (a+i a \tan (c+d x))^3}-\frac {3}{32 a^4 (a+i a \tan (c+d x))^2}-\frac {1}{8 a^5 (a+i a \tan (c+d x))}\right )}{d} \]
((-I)*a^3*((((5*I)/32)*ArcTan[Tan[c + d*x]])/a^6 + 1/(32*a^5*(a - I*a*Tan[ c + d*x])) - 1/(16*a^2*(a + I*a*Tan[c + d*x])^4) - 1/(12*a^3*(a + I*a*Tan[ c + d*x])^3) - 3/(32*a^4*(a + I*a*Tan[c + d*x])^2) - 1/(8*a^5*(a + I*a*Tan [c + d*x]))))/d
Time = 0.30 (sec) , antiderivative size = 137, normalized size of antiderivative = 0.97, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {3042, 3968, 54, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\cos ^2(c+d x)}{(a+i a \tan (c+d x))^3} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {1}{\sec (c+d x)^2 (a+i a \tan (c+d x))^3}dx\) |
\(\Big \downarrow \) 3968 |
\(\displaystyle -\frac {i a^3 \int \frac {1}{(a-i a \tan (c+d x))^2 (i \tan (c+d x) a+a)^5}d(i a \tan (c+d x))}{d}\) |
\(\Big \downarrow \) 54 |
\(\displaystyle -\frac {i a^3 \int \left (\frac {1}{32 a^5 (a-i a \tan (c+d x))^2}+\frac {1}{8 a^5 (i \tan (c+d x) a+a)^2}+\frac {3}{16 a^4 (i \tan (c+d x) a+a)^3}+\frac {1}{4 a^3 (i \tan (c+d x) a+a)^4}+\frac {1}{4 a^2 (i \tan (c+d x) a+a)^5}+\frac {5}{32 a^5 \left (\tan ^2(c+d x) a^2+a^2\right )}\right )d(i a \tan (c+d x))}{d}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -\frac {i a^3 \left (\frac {5 i \arctan (\tan (c+d x))}{32 a^6}+\frac {1}{32 a^5 (a-i a \tan (c+d x))}-\frac {1}{8 a^5 (a+i a \tan (c+d x))}-\frac {3}{32 a^4 (a+i a \tan (c+d x))^2}-\frac {1}{12 a^3 (a+i a \tan (c+d x))^3}-\frac {1}{16 a^2 (a+i a \tan (c+d x))^4}\right )}{d}\) |
((-I)*a^3*((((5*I)/32)*ArcTan[Tan[c + d*x]])/a^6 + 1/(32*a^5*(a - I*a*Tan[ c + d*x])) - 1/(16*a^2*(a + I*a*Tan[c + d*x])^4) - 1/(12*a^3*(a + I*a*Tan[ c + d*x])^3) - 3/(32*a^4*(a + I*a*Tan[c + d*x])^2) - 1/(8*a^5*(a + I*a*Tan [c + d*x]))))/d
3.2.38.3.1 Defintions of rubi rules used
Int[((a_) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[E xpandIntegrand[(a + b*x)^m*(c + d*x)^n, x], x] /; FreeQ[{a, b, c, d}, x] && ILtQ[m, 0] && IntegerQ[n] && !(IGtQ[n, 0] && LtQ[m + n + 2, 0])
Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_ ), x_Symbol] :> Simp[1/(a^(m - 2)*b*f) Subst[Int[(a - x)^(m/2 - 1)*(a + x )^(n + m/2 - 1), x], x, b*Tan[e + f*x]], x] /; FreeQ[{a, b, e, f, n}, x] && EqQ[a^2 + b^2, 0] && IntegerQ[m/2]
Time = 0.73 (sec) , antiderivative size = 97, normalized size of antiderivative = 0.69
method | result | size |
risch | \(\frac {5 x}{32 a^{3}}+\frac {5 i {\mathrm e}^{-4 i \left (d x +c \right )}}{64 a^{3} d}+\frac {5 i {\mathrm e}^{-6 i \left (d x +c \right )}}{192 a^{3} d}+\frac {i {\mathrm e}^{-8 i \left (d x +c \right )}}{256 a^{3} d}+\frac {9 i \cos \left (2 d x +2 c \right )}{64 a^{3} d}+\frac {11 \sin \left (2 d x +2 c \right )}{64 a^{3} d}\) | \(97\) |
derivativedivides | \(\frac {-\frac {5 i \ln \left (\tan \left (d x +c \right )-i\right )}{64}+\frac {i}{16 \left (\tan \left (d x +c \right )-i\right )^{4}}-\frac {3 i}{32 \left (\tan \left (d x +c \right )-i\right )^{2}}-\frac {1}{12 \left (\tan \left (d x +c \right )-i\right )^{3}}+\frac {1}{8 \tan \left (d x +c \right )-8 i}+\frac {5 i \ln \left (\tan \left (d x +c \right )+i\right )}{64}+\frac {1}{32 \tan \left (d x +c \right )+32 i}}{d \,a^{3}}\) | \(102\) |
default | \(\frac {-\frac {5 i \ln \left (\tan \left (d x +c \right )-i\right )}{64}+\frac {i}{16 \left (\tan \left (d x +c \right )-i\right )^{4}}-\frac {3 i}{32 \left (\tan \left (d x +c \right )-i\right )^{2}}-\frac {1}{12 \left (\tan \left (d x +c \right )-i\right )^{3}}+\frac {1}{8 \tan \left (d x +c \right )-8 i}+\frac {5 i \ln \left (\tan \left (d x +c \right )+i\right )}{64}+\frac {1}{32 \tan \left (d x +c \right )+32 i}}{d \,a^{3}}\) | \(102\) |
5/32*x/a^3+5/64*I/a^3/d*exp(-4*I*(d*x+c))+5/192*I/a^3/d*exp(-6*I*(d*x+c))+ 1/256*I/a^3/d*exp(-8*I*(d*x+c))+9/64*I/a^3/d*cos(2*d*x+2*c)+11/64/a^3/d*si n(2*d*x+2*c)
Time = 0.24 (sec) , antiderivative size = 76, normalized size of antiderivative = 0.54 \[ \int \frac {\cos ^2(c+d x)}{(a+i a \tan (c+d x))^3} \, dx=\frac {{\left (120 \, d x e^{\left (8 i \, d x + 8 i \, c\right )} - 12 i \, e^{\left (10 i \, d x + 10 i \, c\right )} + 120 i \, e^{\left (6 i \, d x + 6 i \, c\right )} + 60 i \, e^{\left (4 i \, d x + 4 i \, c\right )} + 20 i \, e^{\left (2 i \, d x + 2 i \, c\right )} + 3 i\right )} e^{\left (-8 i \, d x - 8 i \, c\right )}}{768 \, a^{3} d} \]
1/768*(120*d*x*e^(8*I*d*x + 8*I*c) - 12*I*e^(10*I*d*x + 10*I*c) + 120*I*e^ (6*I*d*x + 6*I*c) + 60*I*e^(4*I*d*x + 4*I*c) + 20*I*e^(2*I*d*x + 2*I*c) + 3*I)*e^(-8*I*d*x - 8*I*c)/(a^3*d)
Time = 0.27 (sec) , antiderivative size = 224, normalized size of antiderivative = 1.59 \[ \int \frac {\cos ^2(c+d x)}{(a+i a \tan (c+d x))^3} \, dx=\begin {cases} \frac {\left (- 100663296 i a^{12} d^{4} e^{22 i c} e^{2 i d x} + 1006632960 i a^{12} d^{4} e^{18 i c} e^{- 2 i d x} + 503316480 i a^{12} d^{4} e^{16 i c} e^{- 4 i d x} + 167772160 i a^{12} d^{4} e^{14 i c} e^{- 6 i d x} + 25165824 i a^{12} d^{4} e^{12 i c} e^{- 8 i d x}\right ) e^{- 20 i c}}{6442450944 a^{15} d^{5}} & \text {for}\: a^{15} d^{5} e^{20 i c} \neq 0 \\x \left (\frac {\left (e^{10 i c} + 5 e^{8 i c} + 10 e^{6 i c} + 10 e^{4 i c} + 5 e^{2 i c} + 1\right ) e^{- 8 i c}}{32 a^{3}} - \frac {5}{32 a^{3}}\right ) & \text {otherwise} \end {cases} + \frac {5 x}{32 a^{3}} \]
Piecewise(((-100663296*I*a**12*d**4*exp(22*I*c)*exp(2*I*d*x) + 1006632960* I*a**12*d**4*exp(18*I*c)*exp(-2*I*d*x) + 503316480*I*a**12*d**4*exp(16*I*c )*exp(-4*I*d*x) + 167772160*I*a**12*d**4*exp(14*I*c)*exp(-6*I*d*x) + 25165 824*I*a**12*d**4*exp(12*I*c)*exp(-8*I*d*x))*exp(-20*I*c)/(6442450944*a**15 *d**5), Ne(a**15*d**5*exp(20*I*c), 0)), (x*((exp(10*I*c) + 5*exp(8*I*c) + 10*exp(6*I*c) + 10*exp(4*I*c) + 5*exp(2*I*c) + 1)*exp(-8*I*c)/(32*a**3) - 5/(32*a**3)), True)) + 5*x/(32*a**3)
Exception generated. \[ \int \frac {\cos ^2(c+d x)}{(a+i a \tan (c+d x))^3} \, dx=\text {Exception raised: RuntimeError} \]
Time = 0.66 (sec) , antiderivative size = 115, normalized size of antiderivative = 0.82 \[ \int \frac {\cos ^2(c+d x)}{(a+i a \tan (c+d x))^3} \, dx=-\frac {-\frac {60 i \, \log \left (\tan \left (d x + c\right ) + i\right )}{a^{3}} + \frac {60 i \, \log \left (\tan \left (d x + c\right ) - i\right )}{a^{3}} - \frac {12 \, {\left (5 \, \tan \left (d x + c\right ) + 7 i\right )}}{a^{3} {\left (i \, \tan \left (d x + c\right ) - 1\right )}} + \frac {-125 i \, \tan \left (d x + c\right )^{4} - 596 \, \tan \left (d x + c\right )^{3} + 1110 i \, \tan \left (d x + c\right )^{2} + 996 \, \tan \left (d x + c\right ) - 405 i}{a^{3} {\left (\tan \left (d x + c\right ) - i\right )}^{4}}}{768 \, d} \]
-1/768*(-60*I*log(tan(d*x + c) + I)/a^3 + 60*I*log(tan(d*x + c) - I)/a^3 - 12*(5*tan(d*x + c) + 7*I)/(a^3*(I*tan(d*x + c) - 1)) + (-125*I*tan(d*x + c)^4 - 596*tan(d*x + c)^3 + 1110*I*tan(d*x + c)^2 + 996*tan(d*x + c) - 405 *I)/(a^3*(tan(d*x + c) - I)^4))/d
Time = 5.22 (sec) , antiderivative size = 124, normalized size of antiderivative = 0.88 \[ \int \frac {\cos ^2(c+d x)}{(a+i a \tan (c+d x))^3} \, dx=\frac {5\,x}{32\,a^3}+\frac {\frac {1}{3\,a^3}+\frac {35\,{\mathrm {tan}\left (c+d\,x\right )}^2}{96\,a^3}-\frac {5\,{\mathrm {tan}\left (c+d\,x\right )}^4}{32\,a^3}+\frac {\mathrm {tan}\left (c+d\,x\right )\,5{}\mathrm {i}}{32\,a^3}+\frac {{\mathrm {tan}\left (c+d\,x\right )}^3\,15{}\mathrm {i}}{32\,a^3}}{d\,\left (-{\mathrm {tan}\left (c+d\,x\right )}^5+{\mathrm {tan}\left (c+d\,x\right )}^4\,3{}\mathrm {i}+2\,{\mathrm {tan}\left (c+d\,x\right )}^3+{\mathrm {tan}\left (c+d\,x\right )}^2\,2{}\mathrm {i}+3\,\mathrm {tan}\left (c+d\,x\right )-\mathrm {i}\right )} \]